#ifndef THREAD_H
#define THREAD_H
#include <QThread>
#include <iostream>
#include <QWaitCondition>
#include <QMutex>
#include <QMutexLocker>
#include "funtool.h"

class funtool;

class WriteThread : public QThread
{
	Q_OBJECT
public:
	WriteThread(QString setp_state,funtool *f);
	void stop();
	void run();
	void setSetpState(QString m_setp_state);

private:
	QString m_setp_state;
	funtool *pFuntool;
	bool stopped;

signals:
	void sendsqlsaveerr(QString);
	void sendTrueMessage();
	void sendFalseMessage();
	void sendStartMessage();
	void sendEndMessage();
	void sendStartPlain();
	void sendTestResult();
	void sendSetp();
	void sendReady();
	void sendSetpResult();
	void sendAllResult(QString);
	void sendComErr(QString);
	void sendDatabaseErr(QString);
	void sendImeiErr();
	void closeWation();
	void sendInformBox();
	void sendTotalResult(QString);
	void sendTableAutoScroll();
	void startTimer(int);
	void killTimer();
};
#endif 